<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('admin_config', function (Blueprint $table) {
            $table->id();
            $table->string('name',50)->unique()->nullable(false);;
            $table->string('title',50)->nullable(false);
            $table->string('group',32)->nullable(false)->default('');
            $table->string('type',32)->nullable(false);
            $table->mediumText('value')->nullable(true);
            $table->text('options',)->nullable(true);
            $table->string('help',255)->nullable(true);
            $table->string('placeholder',255)->nullable(true);
            $table->string('rules',255)->nullable(true);
            $table->integer('sort',false,true)->nullable(true)->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('admin_config');
    }
};
